package com.grt192.demos;

import com.grt192.core.GRTObject;
import com.grt192.utils.Util;
import com.sun.spot.resources.transducers.IAnalogInput;
import com.sun.spot.sensorboard.EDemoBoard;
import java.io.IOException;

/**
 *
 * @author ajc
 */
public class MultimeterDemo extends GRTObject {

    public MultimeterDemo() {
        IAnalogInput[] ins = new IAnalogInput[4];
        for (int i = 0; i < ins.length; i++) {
            ins[i] = EDemoBoard.getInstance().getAnalogInputs()[i];
        }
        while (true) {
            for (int i = 0; i < ins.length; i++) {
                try {
                    System.out.print(ins[i].getVoltage() + "\t\t");
                } catch (IOException ex) {
                    ex.printStackTrace();
                }
                Util.sleep(50);

            }
            System.out.println();
        }
    }
}
